package com.ekalenchuk.module.domain.user;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "Group")
public class Group implements Serializable {

	private static final long serialVersionUID = 773312287234872315L;
	private Long id;
	private Long name;
	private List<GroupMember> members;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="id")
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name="name")
	public Long getName() {
		return name;
	}

	public void setName(Long name) {
		this.name = name;
	}

	@OneToMany(mappedBy="group")
	public List<GroupMember> getMembers() {
		return members;
	}

	public void setMembers(List<GroupMember> members) {
		this.members = members;
	}

}
